home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 6: Level 6 / 17 Bit - Level 6 (1998)(Epic Marketing)[!].iso / quartz / q0833.dms / q0833.adf / FlowChartMacros / FlowChartTool_Diamond.arexx < prev    next >
Text File  |  1997-04-10  |  3KB  |  117 lines

  1. /* FlowChartTool_Diamond*/
  2. /* A SuperMacro by Steven. R. Giovenella, 5823 Dutchess Dr., Colorado Springs, CO 
  3. 80918.  © Copyright 1994 Steven. R. Giovenella, All rights reserved. 
  4. This macro is my gift to the Amiga community.  It may be given away freely to 
  5. anyone, but it may NOT be sold in any way, shape, or form, not even for the cost of 
  6. reproduction, shipping, or handling, without express written permission from the 
  7. author.  This macro may NOT be added to any disk which is to be sold for any price 
  8. or fee, to include shipping and handling.  The ONLY way this macro may be 
  9. distributed is on a disk which is given away 100% free of all charges, or via 
  10. telecommunications networks which do not charge any additional fee as a result of a 
  11. user downloading this particular macro, although general fees for access to the 
  12. telecommunications system as a whole are acceptable.  This macro may only 
  13. bereproduced in its entirety, including all comment lines and code.  The individual 
  14. user may alter this macro for personal use, but may not then distribute the macro 
  15. in any modified form.  If you wish, feel free to send me some money, a Christmas 
  16. card, some other piece of software, or absolutely nothing as a gift for creating this 
  17. macro.  The author of this software is not responsible for any data loss or damage to 
  18. computer equipment as a result, direct or indirect, of the use of this macro. */
  19.  
  20. Options results
  21.  
  22. /* Set maxwidth of box margins */
  23. SectionSetup TOP 1 BOTTOM 1 INSIDE 2.25 OUTSIDE 2.25 COLUMNS 4
  24. Justify CENTER
  25. Hypen  ON
  26. Hotzone .05
  27.  
  28. maxwidth=0
  29. cumheight=0
  30.  
  31. /* Find Range to Use */
  32. Status LinePos
  33.     PARSE VAR Result BegLine BegPos EndLine EndPos
  34. range=EndLine-BegLine+1
  35.  
  36. /* make textblocks */
  37. DO i=1 to range
  38.     linenum=BegLine+i-1
  39.     MoveToLine linenum 0
  40.     Status LineHeight
  41.         lh=Result
  42.     Status Fontname
  43.         fname=Result
  44.     Status FontSize
  45.         fsize=Result
  46.     TextBlockTypePrefs SIZE fsize FONT fname
  47.     ShiftDOWN
  48.     CtrlDOWN
  49.     Cursor DOWN
  50.     Extract
  51.         textline=Result
  52.     ShiftUP
  53.     CtrlUP
  54.     yspot=.25+cumheight
  55.     xspot=1.75
  56.     DrawTextBlock 1 xspot yspot textline
  57.     CurrentObject
  58.         obj.i=Result
  59.     cumheight=cumheight+lh    *.85
  60.     IF i=1 THEN DO
  61.         FirstObject SELECTED
  62.             firstobj=Result
  63.         END
  64.     END
  65.  
  66.  
  67.  
  68. newcumheight=0
  69. DO i=1 to range
  70.     GetObjectCoords obj.i
  71.         PARSE VAR Result page left top width height
  72.     newxpos=4.125-.5*width
  73.     newypos=(.75-.5*cumheight)+newcumheight
  74.     newcumheight=height+newcumheight
  75.     SetObjectCoords obj.i page newxpos newypos width height
  76.     END
  77. SelectObject
  78.  
  79. /* Draw diamond around text */
  80. BoxPrefs LINEWT 2 FILL solid TEXTFLOW none FILLCOLOR white
  81. DrawBox page 3.8 (.8-.34)  .68 .68
  82. SetObjectRotation 0 45
  83. ObjectToBack
  84. i=i+1
  85. CurrentObject
  86.     obj.i=Result
  87. BoxPrefs LINEWT 2 FILL solid TEXTFLOW none FILLCOLOR black
  88. DrawBox page 3.8625 (.8625-.34) .68 .68
  89. SetObjectRotation 0 45
  90. ObjectToBack
  91. i=i+1
  92. CurrentObject
  93.     obj.i=Result
  94. BoxPrefs LINEWT 2 FILL solid TEXTFLOW none FILLCOLOR white
  95. GraphicTool
  96. DO i=1 to (range+3)
  97.     SelectObject obj.i MULTIPLE
  98.     END
  99. Group
  100. Cut
  101. TextTool
  102.  
  103. /* Paste into FlowChart section */
  104. /* Goto FlowChart section or create one */
  105. SectionSetup NEWNAME "Main"
  106. GotoSection "FlowChart"
  107. GetSectionSetup NAME 
  108. IF Result~="FlowChart" THEN DO
  109.     NewSection Text Name "FlowChart" AFTER
  110.     GotoSection "FlowChart"
  111.     END
  112.  
  113. Paste
  114. GraphicTool
  115. redraw
  116. ObjectToFront
  117.